home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / larn / part06 < prev    next >
Encoding:
Internet Message Format  |  1991-01-03  |  55.0 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v11i089:  larn - dungeon type adventure game, Part06/11
  5. Message-ID: <6720@tekred.CNA.TEK.COM>
  6. Date: 18 Dec 90 18:33:58 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1223
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: routley@tle.ENET.DEC.COM (Kevin Routley)
  12. Posting-number: Volume 11, Issue 89
  13. Archive-name: larn/Part06
  14. Environment: Unix, VMS, MS-DOS, termcap
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 6 (of 11)."
  25. # Contents:  larn.maz larn122.doc tgetstr.c
  26. # Wrapped by billr@saab on Tue Dec 18 10:14:19 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'larn.maz' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'larn.maz'\"
  30. else
  31. echo shar: Extracting \"'larn.maz'\" \(27769 characters\)
  32. sed "s/^X//" >'larn.maz' <<'END_OF_FILE'
  33. XD###################################################################
  34. X#           #  .        #                 #     #     #     #   . #
  35. X#           D           D  .                       .        D .   #
  36. X###D##########################################  #     #     ###D###
  37. X#          -#                 #.    #      # ################ .  .#
  38. X#     ####### ######## ############ D #### #                #     #
  39. X# ... #.#   # #  # . # #            # #### # ############ # ###D###
  40. X#     #.# # # ## #   # # ############ #### # #-  #      # # #.    #
  41. X#  .  # # # # ## #-  # # #    -     D #### # # . D    # #.# # ... #
  42. X#     # #.# #    #   # # #   . .    # #    # #   #    # #-# # ~.! #
  43. X###D### ### #######D## # ############ ###### ########## ### #######
  44. X#                    #  @          .#        #     .....       ...#
  45. X###D###########################################################D###
  46. X#  .  #.....#     #     #     #    -#     #     #     #     #     #
  47. X#      .....    .       D           D                 D     D.    #
  48. X#     #.....#     #     #     #     #     #    .#     #     #     #
  49. X###################################################################
  50. X
  51. X###################################################################
  52. X#.. .                   D  #                .  #              #-  #
  53. X############# ######### # ## ### ##### ## #### ###### ####### ### #
  54. X#.#!#~# #   #       .-# # #-   #    #   # # -# #      #           #
  55. X# # #.#  .  #   ####### # #    #    #   # #  # #      #       #####
  56. X# # ..# #####   #     # # #### #    ## ## ## # ###### ####### #   #
  57. X# - ..D #   D   #   . D # #  # #.##### ## ## # #. #.# #..#  # ### #
  58. X####### ####### ###   # # #    # #      # D  # D  D   #..D  #     #
  59. X#-                #   # # #### # ###### # ## # #. #   #..#    #####
  60. X### #######################- # # #    ######################  #   #
  61. X#   ...       #   .       #..# ###    #   - ..  .          #. ### #
  62. X#             #           #  # ###    #################### #  #   #
  63. X#                              ###                                #
  64. X################################################################# #
  65. X#-                        D    ###    #          #            #   #
  66. X#  .                      #            #                   #  D   #
  67. X###################################################################
  68. X
  69. X###################################################################
  70. X#  ..                                                             #
  71. X# ############## ############################################## # #
  72. X#         #    # #                                #     ..    # # #
  73. X#         #D## # # ############D################# ########### # # #
  74. X######### #- # # # #-    D    # # ~  #          # #         # # # #
  75. X#       # #  # # # #   ### #  # #    D   -      # # ####### # # # #
  76. X#  .... # #### # # #   #!# #  # ######      ..  #.# #     # # # # #
  77. X#  .... #      # # # ### # #  # #    #########D#### # ### # # # # #
  78. X#  .... ######## # # D   # #- # #..  #       ...#.# # #.# # # # # #
  79. X#       #        # ###   # #### #.-  D   -      #.# #.#.# # # # # #
  80. X#####DD## ######## #     #    D D.   #          # # #...# # # # # #
  81. X# #   ..# #    # # ############################## # ##### # # # # #
  82. X# ......# #  #   #                                #       # # # # #
  83. X# ####### ###### ################################ ######### # ### #
  84. X#               .D.                                         #     #
  85. X###################################################################
  86. X
  87. X###################################################################
  88. X#                  ##        ##            ###                ##  #
  89. X#  #####            ## ..-  ##            ##.##              ##   #
  90. X#  # ! ##            ## .  ##            ##  .##    ..      ##    #
  91. X#  #....######        ##  ##            ##  .  ##          ##     #
  92. X#  # -  #    ##        ##D#            ##  .    ##        ##      #
  93. X#  #####D  ~  ####### ###........     ## ...     ##      ##       #
  94. X#  #    #     ##        ##   ....    ##  .        ##    ##        #
  95. X#  #.   ########         ##         ##   .     -  ####D####   -   #
  96. X#  #.-  #...## ##   ...   ##        ###  ......  ##       ##      #
  97. X#  #.   #..##   ##         #########  ##    ... ##   ###   ## ..  #
  98. X#  #..  #.##     ## ## -  ##  .  ####  ##      ##   #####   ##    #
  99. X#  #####D##          ##  ##     ######  ##    ##   #######   ##   #
  100. X#  D  -.##            ####     ########  ##DD##    ########   #D  #
  101. X#  ######   ...        ##     ##########                       ## #
  102. X####                                                 .     .    ###
  103. X###################################################################
  104. X
  105. X###################################################################
  106. X#                                                                 #
  107. X#     ####.########################################## ## ##########
  108. X#     #      #.#.#.#                   #.. #.   #           #     #
  109. X#######    # # # # #       #####       #!  #    ########### # ### #
  110. X#     #    # # # # #      ##...##      #   #    #         # # #-# #
  111. X# ..- D    # # # # #     ## .   ##     ####D#####  .. ### #   # # #
  112. X#     #    #       #    ##.   ~ .##    #   #    ###   # # ##### # #
  113. X############ # # # #   ##  . .   .##   #...# .. #.#   # #       # #
  114. X#  ..     .# # # # #   ##     -   ##   #   #    D.D   # ######### #
  115. X#      .   D # # # #    ##.......##    ####D#####.#   #           #
  116. X#   - .    # # # # #     ##     ##     # . #    ###   ########### #
  117. X############ #.#.# #      ###D###      # . #....#               # #
  118. X#            # #-# D               ..  #  .#    ###....##  ##-### #
  119. X####   ########################################## ######    ###   #
  120. X#         .                                                       #
  121. X###################################################################
  122. X
  123. X###################################################################
  124. X#                                                                 #
  125. X#                        ###########################D#######  ##  #
  126. X#  #######################                    # ##...... ##   ##  #
  127. X#                        ########D######  #   # !##.... ##    ##  #
  128. X#   ############    ##  ##    ...      #  #   #...## ~ ## ######  #
  129. X#   #          #    #    # ......      #  #   # .. #####      ##  #
  130. X#   #    - ..  #    #    #   ###########  #   #  .  ######### ##  #
  131. X#   #####  #####    #    #   #            #   #...   ##       ##  #
  132. X#       #  #        ##########  ########  ########DD#### #######  #
  133. X#       #  #  ....  #        #  #             #     #  ##     ##  #
  134. X#   #####  #        #    ....#  #  #########  #     #   ##### ##  #
  135. X#   #-    ######D##########..#  #  #########  #  -  #..  ##   ##  #
  136. X#   #####  #                 #  #             #...  #.....##      #
  137. X#       #  ###################  ###############...  ####   # ######
  138. X#       #                                                         #
  139. X###################################################################
  140. X
  141. X###################################################################
  142. X#                                                                 #
  143. X########### #####      #####     #####D####    #####       ###### #
  144. X#..       # #-..D ######   ##    # ##     #   ## ..##    ### #### #
  145. X#  #### ### ##### #         ##   #  ##### #  ## ### ##   #   #    #
  146. X#  #  # #       # # ##### #  ##  #      # ####  # #..##### - ###  #
  147. X#  #  # ####### ### #...# #   ########  #       # #~.   ....   #  #
  148. X#  #  #       #     #...# #          #  ######### ##############  #
  149. X#  #  ######  #######   # ###   ###  #       ..                #  #
  150. X#  #       #          - # #-#####!#  # #      ####  ## ####    #  #
  151. X#  ######  #   ########## #.. ....#  # ########  #  #  #  ##   ## #
  152. X#     -.#  #####          ####...##  #    .  .#  #..#  #   ##   # #
  153. X#    ####        ######      #.###   #####.####  ####  ###  ##  # #
  154. X#    #-    #######....####   ......      #.#       .     #   ## # #
  155. X#    #######             ##### ###########.###############    ### #
  156. X#                                         .                       #
  157. X###################################################################
  158. X
  159. X###################################################################
  160. X#   #     #-   .      #   # # # # # #   #                         #
  161. X# # #     #####.##### # # # # # # # # # # ###########D########### #
  162. X# # #####     # # ### # # # # # # # # # ###     #....    #  #   # #
  163. X# #     #     #       # # # # # # # # # #       #.!. -.. #.##.# # #
  164. X# # . - #     # ####### # # # # # # # # #       ########## ## #   #
  165. X#.#######     #         #       D     #        .              # # #
  166. X#.     -#     ################################################### #
  167. X#   #####     D.                                             .    #
  168. X#  #         ###  ###D### ### ### ###D### ### ### ###D### ###.### #
  169. X#  # ######  ### .#    .# #.    # #     # #     # #     # # .   # #
  170. X#  ### # -#  ### .#. - .# #     # #...- # # ..  # #  -..# # .   # #
  171. X#      #  #  ###  #. ~ .# #     # #     # #     # # .. .# #     # #
  172. X#.######  #  ###  #     # #.....# #     # #     # #     # #     # #
  173. X# #      #######  ####### ####### ####### ####### ####### ####### #
  174. X# # ...                                       ..                  #
  175. X###################################################################
  176. X
  177. X###################################################################
  178. X#           #  .        #     ###         #     #     #     #   . #
  179. X#           D           D  .        #              .        D .   #
  180. X############################################### #     #     ###D###
  181. X#          -#                 #.    #      # ################ .  .#
  182. X#     #######D######## ############ # #### #                #     #
  183. X# ... #.    # #!~  . # #            # #--# # ############ #####D###
  184. X#     #.# # # ## #   # # ############ #--# # #-  #      # # #.    #
  185. X#  .  # #-# # ## #-  # # #    -     D ## # # # . D #### #.# # ... #
  186. X#     # #-# #    #   # # #   . .    # #    # #   #    # #-# # -.- #
  187. X###D### ### ####### ## # ############ ###### ########## ### ###D###
  188. X#                    #  @          .               .....       ...#
  189. X#####################################           ###############D###
  190. X#  .  #.....#     #     #     #    -#           #     #     #     #
  191. X#      .....    .       D           D                 D     D.    #
  192. X#     #.....#     #     #     #     #          .#     #     #     #
  193. X###################################################################
  194. X
  195. X###################################################################
  196. X#.. .       #           D                   .                 #-  #
  197. X### ######### ######### # ## ### ##### ## ########### ####### ### #
  198. X#.# #   #   #       .-# # #-   #    #   # # -# #      #           #
  199. X# # #.#  .  #   ####### # #    #    #   # #  # #      #       #####
  200. X# # ..#######   #     # # #### #    ## ## ##!# ###### ####### #   #
  201. X# - ..D #   D   #   . D # #  # #.##### ## ## # #. #.# #..#  # ### #
  202. X####### ####### ###   # # #    # #      # D  # D  D   #..D  #     #
  203. X#-                #   # # #### # ###### # ## # #. #   #..#    #####
  204. X### #######################- # # #    ######################  #   #
  205. X#   ...       #   .       #..# ###    #   - ..  .          #. ### #
  206. X#             #           #  # #-#    #################### #  #   #
  207. X#                         #     -#                                #
  208. X################################-################################ #
  209. X#-.....             # ####D    ###    #          #            #   #
  210. X#~.....              #    #            #                   #  D   #
  211. X###################################################################
  212. X
  213. X###################################################################
  214. X#  ..                                                             #
  215. X# ############## ############################################## # #
  216. X#         #    # #                                #     ..    # # #
  217. X#         #D## # # ############D################# ########### # # #
  218. X######### #- # # # #-    D    # #.!..#          # #         # # # #
  219. X#   #   # #  # # # #   ### ## # #....D   -      # # ####### # # # #
  220. X#  .... # #### # # #   #~# #  # ######      ..  #.# #     # # # # #
  221. X###....##      # # # ###.# #  #      #########D## # # ### # # # # #
  222. X#  .... ######## # # D  .# #- #  ..  #       ...#.# # #.# # # # # #
  223. X#   #  ##        # ###  .# ####  .-  D   -      #.# #.#.# # # # # #
  224. X#####DD## ######## #... .#       .   #          # # #.#.  # # # # #
  225. X# #   ..# #      # ############################## # # ##### # # # #
  226. X# ......# #  # # #                                # #       # # # #
  227. X# ####### ###### ################################D# ######### ### #
  228. X#               .D.                                           #-.-#
  229. X###################################################################
  230. X
  231. X###################################################################
  232. X#                  ##        ##         ##        ##          ##  #
  233. X#  ##############   ## ..-  ##          ##  .     ##         ##   #
  234. X#  #    #       ##   ## .  ##           ##   .    ##..      ##    #
  235. X#  #....######   ##   ##  ######## #######  .     ##       ##     #
  236. X#  # -  #    ##   ##   ##D#            ##  .      ##      ##      #
  237. X#  #          D###### ###........     ## ...      ##     ######   #
  238. X#  #    #     ##        ##   ....    ##  .        ##    ##  - #   #
  239. X#  #.   ########         ##         ##   .     -  ####D####.. D   #
  240. X#  #.-  #...## ##   ...   ##        ###  ......  ##       #####   #
  241. X#  #.   #..##   ##         #########  ##    ... ##   ###   ## ..  #
  242. X#  #..  #.##     ## ## -  ##  .  ####  ##      ##   #####   ##    #
  243. X#  #####D#######  #  ##  ##     ##..##  ##    ##   ##   ##   ##   #
  244. X#  D  -.##     #  #   ####     ##.-.-##  ##DD##    ### ####   ##  #
  245. X#  ######.  ...# ####  ##     #### #####                ##     ##D#
  246. X####~!....     D                                     .     .      #
  247. X###################################################################
  248. X
  249. X###################################################################
  250. X#                                                                 #
  251. X#     ####.########################################## ## ##########
  252. X#     #      #.#.#.#                   #..  .   #           #     #
  253. X#######    # # # # #   #############   #        ########### # ### #
  254. X#     #    # # # # #    --##...##--    #        #         # # #-# #
  255. X# ..- D    # # # # #   #-## .   ##-#   ####D#####  .. ### #   # # #
  256. X#     #    #       #   ###.     .###   # ~ #    ###   ### ##### # #
  257. X############ # # # #   ##  . .   .##   #...# .. #.#             # #
  258. X#  ..     .# # # # #   ##     -   ##   #   #    D.    # ######### #
  259. X#      .   D # # # #   ###.......###   ####D#####.#   #           #
  260. X#   - .    # # # # #    -##     ##-    # .      ###   ########### #
  261. X############ #.#.# #   ######D######   # .  ....#               # #
  262. X#            #!#-# #               ..  #  .     ###....##  ##-### #
  263. X####   ##############################  ########## ######    ###   #
  264. X#  D      .                                                       #
  265. X###################################################################
  266. X
  267. X###################################################################
  268. X#                                                                 #
  269. X#                        ###############D####################D#   #
  270. X#  #######################                    # ##......      #   #
  271. X#                        ########D######  #   #  ##....       #   #
  272. X#   ############### ##  ##    ...      #  #   #...##      #####   #
  273. X#   #    ~        # #    #!......      #  #   # .. #####      #   #
  274. X#   #    - ..     # #    #   ###########  #   #  .  ######### #   #
  275. X#   #####  ######## #    #   #         #  #   #...   ##       #   #
  276. X#       #  #      # ##########  ########  ########D #### ######   #
  277. X#       #  #  ....# #        #  #             #     #  ##     #   #
  278. X#   #####  # ###### #    ....#  #  #########  #     #   #####D#   #
  279. X#   #-    ## #      #######..#  #  #########  #  -  #..           #
  280. X#   #####  #                 #  #             #...  #.....        #
  281. X#       #  ###################  ###############...  ####     ######
  282. X#       #                                                         #
  283. X###################################################################
  284. X
  285. X###################################################################
  286. X#                      #                                          #
  287. X########### #####      #         #####D####    #####       ###### #
  288. X#..       # #~..D ######   ##    # ##     #   ## ..##    ### #### #
  289. X#  #### ### ##### #         ##   #  ##### #  ## ### ##   #   #    #
  290. X#  #  # #       # # ##### #  ##  #      # ####  # #..##### - ###  #
  291. X#  #  # ####### ### #...# #   ########  #       # #!.   ....   #  #
  292. X#  #  #       #     #...# #          #  ######### ##############  #
  293. X#  #  ######  #######   # ###   ###  #       ..                #  #
  294. X#  #       #          - # #-    # #  #        ######## ####    #  #
  295. X#  #       #   ########## #.. ....#  # ########        #  ##   ## #
  296. X#  #  -.   #####          ####...##  #    .  .#   ..   #        # #
  297. X#  #             ######      #####   #####.####        #######  # #
  298. X#  #  -    #######....####   ......      #.#       .     #   ## # #
  299. X#  #########             ##### ###########.###############    ### #
  300. X#                                         .                       #
  301. X###################################################################
  302. X
  303. X###################################################################
  304. X# D D     #-..........#     #   #   #   #                         #
  305. X#D#D#     #####.#####.# #   #   #   # # #############D########### #
  306. X# # #####     #.#~###.# #   #   #   # # ###      ....    #  #   # #
  307. X#D#     #     #.......# #   #   #   # # #        . . -.. #. #.# # #
  308. X# # . - #     #.####### #   #   #   # # ##################    #   #
  309. X#D#######     #.        #       D     #        .              # # #
  310. X#. D D -#     ################################################### #
  311. X#  ######      .                                             .    #
  312. X#  #    D    ###  ###D### ####### ###D### ####### ###D### ####### #
  313. X#  # ######  # # .#    .# #.    # #     # #     # #     # # .   # #
  314. X#  ###   -#  # # .#. - .# #     # #...- # # ..  # #  -..# # .   # #
  315. X#DD#      #  # #  #.   .# #     # #     # #     # # .. .# #     # #
  316. X#.######  #    #  #     # #.....# #     # #     # # !   # #     # #
  317. X# #      #######  ####### ### ### ####### ### ### ####### ### ### #
  318. X# # ...                                       ..                  #
  319. X###################################################################
  320. X
  321. X###################################################################
  322. X#     D                    ##           ##  ##     ##      #   #  #
  323. X# - . #   #######           ##   -.-   ##  ##      ## ####     D  #
  324. X####  #   #.#-#.#  .#.    # .##       ##   #  ####### .  ###   #  #
  325. X#     # - ##-#.#D  ###    # ..##     ##  ##D   ### ### ### #####  #
  326. X# .   #   # # #.#  .#.    #-   ##...##..######  #      # # #   #  #
  327. X#  ####   #######         ###  -## ##--## #####   ####     # -.D  #
  328. X#     # #         #         ######D############# ###########   #  #
  329. X#####D# ###########              D D               # # #  .##D##  #
  330. X#     # #         # # #### # #####D############  ###-  D  ##   ####
  331. X# #####   #######   # #!.#-#   #     # . D      ## #   #  .#   #~.#
  332. X#     #   #     #   # #..#####.#     #   ### # ##  ##D######   #..#
  333. X##### #   D #.# # - # #  #   ###     ##### # #    .#   #   ##.##..#
  334. X#  .  #   #     #   # #D## #   #######    .  #    .## .D  ##   #  #
  335. X##### #   #######   #      # #         ### # # ##  #  -#   #   D  #
  336. X#                   #      # ###########   #   ### #####       #  #
  337. X###################################################################
  338. X
  339. X###################################################################
  340. X#     #   #                  #                                    #
  341. X#  #  D   #  #########         #########################.####     #
  342. X#####.#   #  #       ####D#### #               #.#.#.#      #     #
  343. X#   # #   #  # ##### #   #   # # #    #D#      # # # # #    #######
  344. X# #   #####  # #...# # . # - # #     ## ##     # # # # #    # .   #
  345. X# #  ##  # - # D.#~#-#   #   # #    ##...##    # # # # #    D..!  #
  346. X# ####  ###  ###.. #.####D#### #   ##     ##   # # # # #    # .   #
  347. X# #      #   # #####.#   #   # #   #. -   .#   D D D D ############
  348. X#    ##      #    ## #   # . # #   ##     ##   # # # # #.     ..  #
  349. X# ######.### #   ## ##   #   # #    ##   ##    # # # # D   .      #
  350. X#    ##      #  ## ##..##D#### #     ## ##     # # # # #    . -   #
  351. X# #.     #   #D## ##  ##  #  # #.     ###    # #.#.# # ############
  352. X# ###   ###        ####   #    #-.             # #-# #         D  #
  353. X# #   #. #   ### #   #  -    # ########D#################### . ####
  354. X#     #      #   # #   #  #  #                                 D  #
  355. X###################################################################
  356. X
  357. X###################################################################
  358. X#  #         -            #            ##  ###   #                #
  359. X# ## # ################## #            ##   #### # #####    #D### #
  360. X#  . # #                  #        #####     D # #  -  # .. #   # #
  361. X# #### # #  ###D###   -   #   --    .  D     D   # ### #    #   # #
  362. X#    ### #  ##  ##        #        ######   #### # # # #    #   # #
  363. X###      ####  ##   ##### #        #### #  ###     #   #    #   # #
  364. X# # ########- ##   ##   # #        ############################## #
  365. X# # ###  ##  ##   ###   D                                    .    #
  366. X# # ##  ####  ## ##!#   # ###D### ####### ###D### ####### ###D### #
  367. X#   #  ##  ## .###..##### #     # #..~..# #     # #     # # .   # #
  368. X###D#D###   ##..#..##   # # .- .# #  .  # # ..  # #  -..# # .   # #
  369. X#   #   #    ##...##  - # # .  .# #     # #     # # .. .# #     # #
  370. X# . #     .. ######     # #    .# #.    # #     # #     # #     # #
  371. X#   D        #########  # ####### ###D### ####### ###D### ####### #
  372. X#   #   #    D            #                                       #
  373. X###################################################################
  374. X
  375. X###################################################################
  376. X#         #    #   #          ##     ##   ##   ##       D         #
  377. X# #. # -# #  # #   #  ####### D##...## ####### ### ###### ######  #
  378. X#         #  # ## ##  #!  .##.# ## ##          D.#      # #~.. D  #
  379. X####D######  #  # .####...## ##  # #######D### #######. # # .### ##
  380. X#  #         #  ##  ####D## ##   #          #   ##   .. # #### # ##
  381. X#  ########  #   ## ###  ### ## ## #### ### #   ##      #      #  #
  382. X#  ########  ###### # .    ## ###   #     # ######D#############  #
  383. X#                      .   ##     - ####### #        #            #
  384. X#           ####### #   .  ## ###   ##   D.   #####D###########D###
  385. X#####D##### #     # ###. ### ##### ### - ## ###  #   #   #   #    #
  386. X#.       -# #.#   # ####### ##     # #   ## #    # .   -   . D    #
  387. X#####D##### # #   #         ##   # # ###### #     #  #   #   #    #
  388. X#-       .# # #   #####D######   # # . #  # #### ######D###########
  389. X##### ##### # #   D   #  #   D   # # # # ####                     #
  390. X#         D   #   D   #  #   D   #   #             ..             #
  391. X###################################################################
  392. X
  393. X###################################################################
  394. X#     D                    ##           ##  ##     ##      #   #  #
  395. X# - . #   #######           ##   -.-   ##  ##      ## ####     D  #
  396. X####  #   #.#-#.#  .#.    # .##       ##   #  ####### .  ###   #  #
  397. X#     # - ##-#.#D  ###    # ..##     ##  ##D   ### ### ### #####  #
  398. X# .   #   # # #.#  .#.    #-   ##...##..######  #      # # #   #  #
  399. X#  ####   #######      #  ###  -## ##--## ## ##   ###      # -.D  #
  400. X#     # #         #   ##    ######D######  ##### ####D######   #  #
  401. X#####D# ###########              D D               #   # ..##D##  #
  402. X#     # #         # # #### # #####D############  ###-  D  ##   ####
  403. X# #####   #######   # # .#-#   #     # . D      ## #   # .!#   #  #
  404. X#     #   #  .. #   # #. #####.#     #   ### # ##  ######### . #  #
  405. X##### #   D #.#~# - # #  #   ###     ##### # #    .#   #   ##D##..#
  406. X#  .  #   #  .. #   # #D## #   #######    .  #    .## .D  ##   #  #
  407. X##### #   #######   #      # #         ### # # ##  #  -#   #   D  #
  408. X#                   #      # #         #   #   ### #####       #  #
  409. X###################################################################
  410. X
  411. X###################################################################
  412. X#     # . #                  #                                    #
  413. X#  #  D .!#  #########         #########################.####     #
  414. X#####.# . #  #       ####D#### #               #.#.#.#      #     #
  415. X#   # #.. #  # ##### #   #   # # ##   #D#   ## # # # # #    ###D###
  416. X# #   #####  # #.  # # . # - # # #-  ## ##  -# # # # # #    # .   #
  417. X# #  ##  # - # D.# #-#   #   # #    ##...##    # # # # #    #..!  #
  418. X# ####  ###  ###.  #.######### #   ##     ##   # # # # #    # .   #
  419. X# #      #   #~#####.#   #   # D   #. -   .#   # D D D ############
  420. X#    ##      #   .## #   # . # #   ##     ##   # # # # #.     ..  #
  421. X# ######.### #...##  #.. #   # #    ##   ##    # # # # D   .      #
  422. X#    ##      #..##  #####D#### # #   ## ##   # # # # # #    . -   #
  423. X# #.     #   #D##   #     #  # #.##   ###   ## #.#.# # ############
  424. X# ###   ###         ####  #    #-.             # #-# #         D  #
  425. X# #   #. #   ### #   #  -    # ############################# . ####
  426. X#     #      #   # #   #  #  #                                 D  #
  427. X###################################################################
  428. X
  429. X###################################################################
  430. X#  #         -            #        #   #   ###   #                #
  431. X# ## # ################## #          # #    #### # #####    #D### #
  432. X#  . # #                  #        #####     D   #  -  # .. #   # #
  433. X# #### # #  ###D##### -   #   --    .  D     D   # ### #    #   # #
  434. X#    ### #  ##  ##  D     #        #####    #### # # # #    #   # #
  435. X###      ####  ##   ##### #        #####   ###     #   #    #   # #
  436. X# # ########- ##   ##   # #        ############################## #
  437. X# # ###~.##  ##   ###   D                                    .    #
  438. X# # ##..####  ## ## #   # ###D### ####### ###D### ####### ###D### #
  439. X#   #. ##  ## .###. ##### #     # #.   .# #     # #     # #.....# #
  440. X##D##D###   ##. #. ##   # # .- .# #  .  # # ..  # #  -..# #.....# #
  441. X#   #   #    ##.  ##  - # # .  .# #     # #     # # .. .# #     # #
  442. X# . #     .. ######  .. # #    .# #.    # #     # #     # #  !  # #
  443. X#   D        #########D## ####### ### ### ####### ### ### ####### #
  444. X#   #   #    D            #                                       #
  445. X###################################################################
  446. X
  447. X###################################################################
  448. X#         #    #   #          ##     ##   #     #       D         #
  449. X# #. # -# #  # #   #  ####### D##...## ####### ### ###### ######  #
  450. X# #  #  # #  # ## ##  # .. ##.# ## ##          D.#      # # .  D  #
  451. X#      .  #  #  # .####   ### #  # #######D### #######. # # .### ##
  452. X####D######  #  ##  ####D## # #  #          #    #  ##. # #### # ##
  453. X#         #  #   ## ###  #### # ## #### ### #    #    . #      #  #
  454. X#  #####  #  ###### # .    ## ###   #     # ######D#############  #
  455. X#  #####  #            .   ##     - #######          #            #
  456. X#           ####### #   .  ##  ##    #   D.  ##D###################
  457. X#####D##### #     # ###. ###  ###  # # - ##  #   #   #   #   # ...#
  458. X#.       -# #.#   # #######  ##    # #   ##  #     .   -   . D ..!#
  459. X########### # #   #         ##   # ###########   #   #   #   # ...#
  460. X#-       .# # #   #####D######   # # . #   # ##D###################
  461. X##### ##### # #   D   #..#   D   # # # # # #                      #
  462. X#         D   #   D   #.~#   D   #   #   #         ..             #
  463. X###################################################################
  464. X
  465. END_OF_FILE
  466. if test 27769 -ne `wc -c <'larn.maz'`; then
  467.     echo shar: \"'larn.maz'\" unpacked with wrong size!
  468. fi
  469. # end of 'larn.maz'
  470. fi
  471. if test -f 'larn122.doc' -a "${1}" != "-c" ; then 
  472.   echo shar: Will not clobber existing file \"'larn122.doc'\"
  473. else
  474. echo shar: Extracting \"'larn122.doc'\" \(18526 characters\)
  475. sed "s/^X//" >'larn122.doc' <<'END_OF_FILE'
  476. X
  477. X
  478. X                 PC LARN version 12.2 for IBM PC Compatibles
  479. X                 -------------------------------------------
  480. X
  481. X
  482. X     Table of contents
  483. X     -----------------
  484. X
  485. X
  486. X        1.  Introduction
  487. X        2.  System requirements
  488. X        3.  Files Supplied
  489. X        4.  Installation
  490. X        5.  Configuration
  491. X        6.  Command line options
  492. X        7.  TERMCAP
  493. X        8.  WIZARD mode
  494. X        9.  History and other Information
  495. X
  496. X
  497. X
  498. X
  499. X     1. Introduction
  500. X     ---------------
  501. X
  502. X     LARN is a dungeon type adventure game similar in concept to HACK, ROGUE 
  503. X     or MORIA, but with a different feel and winning criteria.  LARN was 
  504. X     released for the UNIX environment in 1986 by Noah Morgan.  It was 
  505. X     subsequently ported to the MS-DOS environment by Don Kneller.  Kevin 
  506. X     Routley has been working on enhancements to LARN on and off for the
  507. X     past year.
  508. X
  509. X
  510. X     2. System requirements
  511. X     ----------------------
  512. X
  513. X     PC LARN requires:
  514. X
  515. X       - MS-DOS or PC-DOS 2.x or above.
  516. X
  517. X       - at least 256K of RAM.
  518. X
  519. X       - disk storage capacity of at least 360K, although twice that much is
  520. X         preferred if you want to "checkpoint" your game to prevent
  521. X         accidental lose due to a system failure.
  522. X
  523. X       - the ANSI.SYS device driver must be installed (although the NANSI.SYS
  524. X         driver is *strongly* preferred and has been included in this
  525. X         distribution).  You should install either ANSI.SYS or NANSI.SYS, but
  526. X         not both.  To install NANSI.SYS, put the line "device=NANSI.SYS" in
  527. X         your CONFIG.SYS file.  See the TERMCAP section for further details.
  528. X
  529. X
  530. X     3. Files supplied
  531. X     -----------------
  532. X
  533. X     The following files should be included in this LARN122.ZIP file:
  534. X
  535. X       LARN122.DOC       This documentation.
  536. X
  537. X       LARN122.FIX       Changes made between LARN V12.0 and V12.2.
  538. X
  539. X       LARN122.EXE       The executable file.
  540. X
  541. X       LARN.FTN          Fortune cookie messages.
  542. X
  543. X       LARN.HLP          A help file, which can be read with the "?"
  544. X                         command in LARN.
  545. X
  546. X       LARN.MAZ          Some maze levels are pre-calculated and
  547. X                         stored here.
  548. X
  549. X       LARN.OPT          An example LARN.OPT file (see the CONFIGURATION
  550. X                         section).
  551. X
  552. X       TERMCAP           A file describing the escape sequences to send
  553. X                         to the terminal.  The supplied TERMCAP file is
  554. X                         for monochrome systems.  See the TERMCAP section
  555. X                         for details on changing TERMCAP.
  556. X
  557. X       NANSI.DOC         The documentation for NANSI.SYS.
  558. X
  559. X       NANSI.SYS         A new ANSI.SYS that is *much* faster than
  560. X                         ANSI.SYS and supports the line insert and line
  561. X                         delete escape sequence that LARN uses.  This
  562. X                         excellent product is written by Daniel Kegel.
  563. X                         See the TERMCAP section and NANSI.DOC for more
  564. X                         details.
  565. X
  566. X
  567. X     4. Installation
  568. X     ---------------
  569. X
  570. X     NANSI.SYS or ANSI.SYS must be installed as a device driver on your 
  571. X     system in order for LARN to work (see System Requirements above).
  572. X
  573. X     For a hard disk system I suggest creating a \GAMES\LARN directory and
  574. X     placing LARN and the provided support files in that directory.  Following
  575. X     that, you would place \GAMES\LARN in your PATH.
  576. X
  577. X     LARN will create several other files (LARN.SCR, LARN.PID, LARN.LOG)
  578. X     in that directory.  Also, save files (LARN.SAV) and checkpoint files
  579. X     (LARN.CKP) will go in there by default.  You will want to set the
  580. X     'larndir:' option in your LARN.OPT file (see the Configuration section
  581. X     below) to point to this directory.
  582. X
  583. X     For two-floppy systems, I would suggest the following:
  584. X
  585. X         o place LARN122.EXE, LARN.OPT and TERMCAP. on disk one.
  586. X
  587. X         o place LARN.FTN, LARN.MAZ, and LARN.HLP on disk two.  This will
  588. X           be the 'larndir:' disk (see the Configuration section below).
  589. X           LARN.SCR, LARN.PID, LARN.LOG, save files, and checkpoint files
  590. X           will go on this disk.
  591. X
  592. X
  593. X     5. Configuration
  594. X     ----------------
  595. X
  596. X     PC LARN is configured by options placed in the file LARN.OPT.
  597. X     When PC LARN starts up, it looks in the current directory for
  598. X     this file, then in directories along your PATH.  Here are the
  599. X     options that can be put in LARN.OPT.
  600. X
  601. X     Options that are followed with a colon, ":", take at least one
  602. X     argument.  Options without a colon are boolean, meaning you select
  603. X     that option merely by mentioning it.
  604. X
  605. X
  606. X     These options are only in PC LARN:
  607. X
  608. X       cursor:        start-line     end-line
  609. X            Normally, LARN uses the standard DOS cursor (the flashing
  610. X            underscore) to show where your player is located.  This can be
  611. X            difficult to see.  This option results in a *BIOS* call to change
  612. X            the cursor size.  For a monochrome display, the normal value of
  613. X            start-line and end-line is 11 and 12.  Values of 4 and 9 give a
  614. X            larger cursor which is not too obtrusive.
  615. X
  616. X            If "cursor" is not specified, no BIOS call is made.
  617. X
  618. X       DECRainbow
  619. X            Put this in LARN.OPT if your computer is a DEC Rainbow and you
  620. X            want to use graphics characters for drawing the maze.  You can
  621. X            use any characters from the ASCII character set and from the
  622. X            "line-drawing" character set.  To use line-drawing characters,
  623. X            take the decimal value of the character and add 128 to it.  This
  624. X            makes the values of line-drawing characters lie between decimal
  625. X            128 and 255 and tells PC LARN you want a line-drawing character.
  626. X
  627. X            Every attempt has been made with PC LARN V12.2 to maintain
  628. X            DECRainbow compatibility as provided by Don Kneller.
  629. X            Unfortunately, since I do not have access to a Rainbow, I cannot
  630. X            make any guarentees.
  631. X
  632. X       graphics:      wallc     floorc
  633. X            In UNIX LARN, the wall character is a # and the floor character
  634. X            is a blank (which makes it almost impossible to tell where you've
  635. X            been).  In PC LARN, the default wall character is also a # but
  636. X            the default floor character is a period.
  637. X
  638. X            This option allows you to change these characters to something
  639. X            you like.  Suggested characters are 176 (a graphic block) and
  640. X            249 (a central dot).
  641. X
  642. X            Almost all ASCII (non-graphics) characters already represent
  643. X            objects in LARN, so you should only choose numbers that are
  644. X            in the graphics character set (i.e. those with decimal values
  645. X            greater than 128).
  646. X
  647. X       keypad
  648. X            This enables the keypad for use with LARN.  A *BIOS* call is used
  649. X            to read the keypad.  The correspondance between keypad and game
  650. X            command is:
  651. X
  652. X                   Keypad                   Command
  653. X                   7  8  9         u+l(y)    up(k)    u+r(u)
  654. X                    \ | /                 \    |    /
  655. X                   4 -5- 6        left(h)   nothing   right(l)
  656. X                    / | \                 /    |    \
  657. X                   1  2  3         d+l(b)    down(j)  d+r(n)
  658. X                 Ins             inventory(i)
  659. X
  660. X            The letter in () is the game command letter. "u+l" means up and
  661. X            left.  The keypad "7" is translated to the command for moving one
  662. X            space up and left.  With shift the commands are the same as the
  663. X            uppercase letters.
  664. X
  665. X       larndir:       directory
  666. X            Sets "directory" to be the place LARN looks for files.  For hard
  667. X            disks set this to be \GAMES\LARN.  For 2-floppy systems, use B:
  668. X
  669. X            If "larndir" is not specified, the current directory is assumed.
  670. X
  671. X       ramlevels:     number
  672. X            This number is the maximum number of levels PC LARN will keep in
  673. X            memory.  The number can be between 1 and 14.  Normally, PC LARN
  674. X            will use as much memory as available, but you may want to use
  675. X            less so there will be enough memory to start up a second copy of
  676. X            COMMAND.COM with the LARN command `!'.  If there isn't enough
  677. X            memory for COMMAND.COM, LARN will clear the screen and prompt
  678. X            with "A>" until return is struck, then go back to the game.
  679. X
  680. X            If "ramlevels" is not specified, a value of 14 is used.  If
  681. X            "number" is less than 14, LARN will use a swapfile to store the
  682. X            oldest levels.  Note that a level takes about 8K of memory.
  683. X
  684. X       rawio
  685. X            This option causes the input and output of your computer to be
  686. X            switched to "raw" mode.  The advantage of this is faster output
  687. X            and better handling of special characters ^S and ^P.
  688. X
  689. X            ===========  WARNING ==========
  690. X            Some computers (eg. DEC Rainbows) hang if rawio is attempted.
  691. X            ==============================
  692. X
  693. X       swapfile:      filename
  694. X            This is the name of the swap file that will be used if ramlevels
  695. X            is less than 14.  If all the levels fit in memory, no swap file
  696. X            will be used.  You may want to put the swapfile on a RAMdisk.
  697. X            If "swapfile" is not specified, LARN.SWP in directory larndir
  698. X            will be used.
  699. X
  700. X
  701. X
  702. X     The following are options found in UNIX LARN as well:
  703. X
  704. X       auto-pickup
  705. X            Starts you out in 'automatic pickup' mode.  Whenever the player
  706. X            moves onto an object, it will be picked up.  This mode can be
  707. X            toggled with the '@' command while in the game.
  708. X
  709. X       bold-objects
  710. X            By specifying this option, all objects in the game will be
  711. X            highlighted.  The 'highlight-objects' and 'inverse-objects'
  712. X            specify which highlighting method will be used.
  713. X
  714. X            The default is non-bold objects, except if the 'original-objects'
  715. X            option is specified, when it is *forced* on (to distinguish
  716. X            monsters and objects that are represented by the same
  717. X            character).
  718. X
  719. X       enable-checkpointing
  720. X            With this option, the game is saved every 400 moves.  If your
  721. X            system crashes it is possible to recover from the last checkpoint
  722. X            file (LARN.CPK in the LARN directory) with the command "larn ++".
  723. X
  724. X       highlight-objects
  725. X            If the 'bold-objects' option is specified, this option causes
  726. X            objects to be highlighted with bolding.
  727. X
  728. X       inverse-objects
  729. X            If the 'bold-objects' option is specified, this option causes
  730. X            objects to be highlighted with inverse video.  The default is
  731. X            'highlight-objects'.
  732. X
  733. X       monster:       name
  734. X            Sets the name of a monster.  If the name has a space in it,
  735. X            enclose it in double quotes (eg "tooth fairy").  The leading
  736. X            character determines which monster the name goes with (e.g.
  737. X            "monster: bee" and "monster: Buzzbomb" change the names of
  738. X            bugbears and Bats, respectively).
  739. X
  740. X       name:          yourname
  741. X            Sets the name of the player.  If you want a space in your name,
  742. X            enclose it in double quotes (eg "Mad Max").
  743. X
  744. X       no-introduction
  745. X            Skip displaying the opening messages.
  746. X
  747. X       no-beep
  748. X            Disable sound from the speaker.
  749. X
  750. X       original-objects
  751. X            Like 'prompting' mode, this mode is provided for compatibility
  752. X            with LARN V12.0.  By specifying this option, the characters
  753. X            used to show objects in the game are the same as in 12.0.  The
  754. X            default is to use characters that are closer to those used with
  755. X            HACK, ROGUE and MORIA.
  756. X
  757. X       prompt-on-objects
  758. X            By specifying this option, you enable 'prompting' mode.  In this
  759. X            mode, the player is prompted for the action to perform when
  760. X            encountering an object (e.g. 'Eat, pick up, or ignore?').
  761. X            Prompting mode is provided for compatibility with LARN V12.0, and
  762. X            is off by default.
  763. X
  764. X       savefile:      filename
  765. X            The filename to use for saving the game.  The default is LARN.SAV
  766. X            in the LARN directory.  For a 2-floppy system you might try
  767. X            B:LARN.SAV if the LARN directory is on the A disk drive.
  768. X
  769. X
  770. X     6. Command line options
  771. X     -----------------------
  772. X
  773. X     There are several command line options that can modify the behavior of
  774. X     LARN.  These are:
  775. X
  776. X       -o optionfile  Use this as the option file rather than LARN.OPT.  As
  777. X                      with LARN.OPT, the current directory then directories
  778. X                      along your path are searched for this file which
  779. X                      supplies configuration information.
  780. X
  781. X       -s             Show scores.
  782. X
  783. X       -l             Show log file.  You have to know the Wizard's password
  784. X                      to do this.
  785. X
  786. X       -i             Show all scores including the inventories of dead
  787. X                      players.
  788. X
  789. X       -c             Create a new score file.  You have to know the Wizard's
  790. X                      password to do this.  Erasing LARN.SCR has the same
  791. X                      effect.
  792. X
  793. X       -n             No welcoming message.  Prevents printing of the short
  794. X                      introduction to LARN.  Putting the "no-introduction"
  795. X                      configuration option in LARN.OPT has the same effect.
  796. X
  797. X       -#             Where # is a number from 0 to 9.  This sets the
  798. X                      difficulty of LARN to this level.  Normally, LARN
  799. X                      starts out with difficulty 0 and increases in
  800. X                      difficulty by 1 when you win at the current level.
  801. X                      Thus the game automatically gets more difficult.
  802. X
  803. X       -h             A help screen that shows the command line arguments.
  804. X
  805. X       -p             Prompt for actions on objects.  Specifying the
  806. X                      'prompt-on-objects' option in LARN.OPT has the same
  807. X                      affect.
  808. X
  809. X       ++             Restore a game from a checkpoint file.  If you have
  810. X                      checkpointing enabled (with the "enable-checkpointing"
  811. X                      configuration option in LARN.OPT) then LARN writes a
  812. X                      checkpoint file every 400 moves.  Should your system
  813. X                      crash you can recover the game from the checkpoint file
  814. X                      with this command line option
  815. X
  816. X       For example:  "larn -n -o bobslarn.opt" starts up LARN with no
  817. X       introductory message and uses bobslarn.opt file for configuration 
  818. X       options.  "larn ++" tries to restore LARN from a checkpoint file.
  819. X
  820. X
  821. X     7. TERMCAP
  822. X     ----------
  823. X
  824. X     LARN uses the UNIX "termcap" to select escape sequences to be sent to
  825. X     the terminal driver (either ANSI.SYS or NANSI.SYS) to change video modes.
  826. X     When LARN starts up, it checks in the environment for the variable called
  827. X     "TERM".  The DOS command:
  828. X       set TERM ibmpc-ega
  829. X     will give the environment variable "TERM" the value "ibmpc-ega".  By
  830. X     default, LARN assumes the value of TERM is "ibmpc-mono".
  831. X
  832. X     Then LARN looks in the file called "TERMCAP" for a termininiefinition
  833. X     with the same name as the value of TERM.  LARN first looks for TERMCAP in
  834. X     the current directory, then in directory "\ETC" (the normal UNIX place),
  835. X     then in directories along your PATH.
  836. X
  837. X     The TERMCAP file uses 2 letter codes to describe each escape sequence
  838. X     and \E to mean ESC (the escape character is decimal 27).  Each entry is
  839. X     enclosed in colons.  For example, to start underscore mode on a monochrome
  840. X     display, we want to send the sequence "ESC[4m".  This looks like
  841. X     ":us=\E4m:" as a termcap entry.
  842. X
  843. X     The following sequences are used by LARN:
  844. X
  845. X       ti   terminal initialization.  You could have something like:
  846. X                 :ti=\E44;37m:
  847. X            which would mean to select blue background and white foreground.
  848. X
  849. X       te   terminal end.  To reset your terminal to white on black:
  850. X                 :te=\E0m:
  851. X
  852. X       so   stand out.  Select red forground, keeping the blue background:
  853. X                 :so=\E31m:
  854. X
  855. X       se   standout end.  Back to white on blue:
  856. X                 :se=\E44;37m:
  857. X
  858. X       al   insert line.  This is *not* available in ANSI.SYS, so remove this
  859. X            entry if you're using ANSI.
  860. X
  861. X       dl   delete line.  This is *not* available in ANSI.SYS, so remove this
  862. X            entry if you're using ANSI.
  863. X
  864. X     If you want to make your own TERMCAP entry, copy the "ibmpc-mono"
  865. X     entry, replace the name (eg use "ibmpc-color" or "ibmpc-ega" or whatever),
  866. X     then replace the sequences with whatever you please.  The possible escape
  867. X     sequences are generally listed in the DOS manual in the description of
  868. X     ANSI.SYS, as well as in the NANSI.DOC file.
  869. X
  870. X     Remember to change the environment variable "TERM" to reflect which
  871. X     TERMCAP entry you want!  You should probably put a "set TERM=..." line in
  872. X     your AUTOEXEC.BAT file.
  873. X
  874. X
  875. X     8. WIZARD mode
  876. X     --------------
  877. X
  878. X     There is a WIZARD mode for testing features of the game.  To get into
  879. X     WIZARD mode, type in an underscore "_" and answer the prompt for the
  880. X     password with "pvnert(x)".  Wizards are non-scoring characters that get
  881. X     enlightenment, everlasting expanded awareness and one of every object in
  882. X     the game.
  883. X
  884. X
  885. X     9. History and Other Information
  886. X     --------------------------------
  887. X
  888. X     Noah Morgan originally created LARN 12.0 and released the UNIX
  889. X     version to the USENET in 1986.  Don Kneller ported the UNIX
  890. X     version to MSDOS (both IBM PCs and DEC Rainbows).
  891. X
  892. X     Kevin Routley has been working on LARN enhancements on and off for
  893. X     the past two years.  Version 12.1 had a limited distribution.
  894. X     Version 12.2 is the last version from Kevin that will maintain
  895. X     savefile compatibility with version 12.0 savefiles.  Future
  896. X     versions (if any) will be released as Shareware.
  897. X
  898. X     Other editions of Larn have been distributed by others, namely
  899. X     LARN13 and Ultra-Larn.  For better or for worse, neither of these
  900. X     versions were as 'true' to the original concepts and feel of Larn
  901. X     12.0.
  902. X
  903. X     I hope you enjoy this version of LARN.  Please send any questions,
  904. X     suggestions, requests, or comments regarding LARN and LARN V12.2
  905. X     in particular to:
  906. X
  907. X                 Kevin Routley
  908. X                 421 Midhurst Road
  909. X                 Nashua, NH  03062
  910. X
  911. X                 July 1, 1990
  912. END_OF_FILE
  913. if test 18526 -ne `wc -c <'larn122.doc'`; then
  914.     echo shar: \"'larn122.doc'\" unpacked with wrong size!
  915. fi
  916. # end of 'larn122.doc'
  917. fi
  918. if test -f 'tgetstr.c' -a "${1}" != "-c" ; then 
  919.   echo shar: Will not clobber existing file \"'tgetstr.c'\"
  920. else
  921. echo shar: Extracting \"'tgetstr.c'\" \(6347 characters\)
  922. sed "s/^X//" >'tgetstr.c' <<'END_OF_FILE'
  923. X/************************************************************************
  924. X *                                    *
  925. X *            Copyright (c) 1982, Fred Fish            *
  926. X *                All Rights Reserved                *
  927. X *                                    *
  928. X *    This software and/or documentation is released for public    *
  929. X *    distribution for personal, non-commercial use only.        *
  930. X *    Limited rights to use, modify, and redistribute are hereby    *
  931. X *    granted for non-commercial purposes, provided that all        *
  932. X *    copyright notices remain intact and all changes are clearly    *
  933. X *    documented.  The author makes no warranty of any kind with    *
  934. X *    respect to this product and explicitly disclaims any implied    *
  935. X *    warranties of merchantability or fitness for any particular    *
  936. X *    purpose.                            *
  937. X *                                    *
  938. X ************************************************************************
  939. X */
  940. X
  941. X
  942. X/*
  943. X *  LIBRARY FUNCTION
  944. X *
  945. X *    tgetstr   extract string capability from termcap entry
  946. X *
  947. X *  KEY WORDS
  948. X *
  949. X *    termcap
  950. X *
  951. X *  SYNOPSIS
  952. X *
  953. X *    char *tgetstr(id,area)
  954. X *    char *id;
  955. X *    char **area;
  956. X *
  957. X *  DESCRIPTION
  958. X *
  959. X *    Gets the string capability for <id>, placing it in
  960. X *    the buffer at *area, and advancing *area to point
  961. X *    to next available storage.
  962. X *
  963. X *    For example, if the following capabilities are
  964. X *    in the termcap file:
  965. X *
  966. X *        ZZ=zzzz
  967. X *        YY=yyyyyy
  968. X *        WW=www
  969. X *
  970. X *    then successive calls using YY, ZZ, and WW will
  971. X *    build the following buffer:
  972. X *
  973. X *        yyyyyy0zzzz0www0
  974. X *
  975. X *    The first call will return a pointer to yyyyyy, the
  976. X *    second will return a pointer to zzzz and the third
  977. X *    will return a pointer to www.  Note that each
  978. X *    string is null terminated, as are all C strings.
  979. X *
  980. X *    Characters preceded by the carot character (\136)
  981. X *    are mapped into the corresponding control character.
  982. X *    For example, the two character sequence ^A becomes
  983. X *    a single control-A (\001) character.
  984. X *
  985. X *    The escape character is the normal C backslash and
  986. X *    the normal C escape sequences are recognized, along
  987. X *    with a special sequence for the ASCII escape character
  988. X *    (\033).  The recognized sequences are:
  989. X *
  990. X *        \E   =>  '\033'  (ASCII escape character)
  991. X *        \b   =>  '\010'  (ASCII backspace character)
  992. X *        \f   =>  '\014'  (ASCII form feed character)
  993. X *        \n   =>  '\012'  (ASCII newline/linefeed char)
  994. X *        \r   =>  '\015'  (ASCII carriage return char)
  995. X *        \t   =>  '\011'  (ASCII tab character)
  996. X *        \ddd =>  '\ddd'  (arbitrary ASCII digit)
  997. X *        \x   =>  'x'     (ordinary ASCII character)
  998. X *
  999. X */
  1000. X
  1001. X#include <stdio.h>
  1002. X#include <ctype.h>
  1003. X#ifdef VMS
  1004. X# define index strchr
  1005. X#endif VMS
  1006. X
  1007. X#ifdef ULTRIX
  1008. X# include <strings.h>
  1009. X
  1010. X#endif
  1011. X
  1012. Xextern char *_tcpbuf;        /* Termcap entry buffer pointer */
  1013. X
  1014. X/*
  1015. X *  PSEUDO CODE
  1016. X *
  1017. X *    Begin tgetstr
  1018. X *        Initialize pointer to the termcap entry buffer.
  1019. X *        While there is a field to process
  1020. X *        Skip over the field separator character.
  1021. X *        If this is the entry we want then
  1022. X *            If the entry is not a string then
  1023. X *            Return NULL.
  1024. X *            Else
  1025. X *            Transfer string and rtn pointer.
  1026. X *            End if
  1027. X *        End if
  1028. X *        End while
  1029. X *        Return NULL
  1030. X *    End tgetstr
  1031. X *
  1032. X */
  1033. X
  1034. Xchar *tgetstr(id,area)
  1035. Xchar *id;
  1036. Xchar **area;
  1037. X{
  1038. X    char *bp;
  1039. X#ifdef MSDOS
  1040. X    extern char *index();
  1041. X#endif
  1042. X    char *decode();
  1043. X
  1044. X    bp = _tcpbuf;
  1045. X    while ((bp = (char *)index(bp,':')) != NULL) {
  1046. X    bp++;
  1047. X    if (*bp++ == id[0] && *bp != NULL && *bp++ == id[1]) {
  1048. X        if (*bp != NULL && *bp++ != '=') {
  1049. X        return(NULL);
  1050. X        } else {
  1051. X        return(decode(bp,area));
  1052. X        }
  1053. X    }
  1054. X    }
  1055. X    return(NULL);
  1056. X}
  1057. X
  1058. X/*
  1059. X *  INTERNAL FUNCTION
  1060. X *
  1061. X *    decode   transfer string capability, decoding escapes
  1062. X *
  1063. X *  SYNOPSIS
  1064. X *
  1065. X *    static char *decode(bp,area)
  1066. X *    char *bp;
  1067. X *    char **area;
  1068. X *
  1069. X *  DESCRIPTION
  1070. X *
  1071. X *    Transfers the string capability, up to the next ':'
  1072. X *    character, or null, to the buffer pointed to by
  1073. X *    the pointer in *area.  Note that the initial
  1074. X *    value of *area and *area is updated to point
  1075. X *    to the next available location after the null
  1076. X *    terminating the transfered string.
  1077. X *
  1078. X *  BUGS
  1079. X *
  1080. X *    There is no overflow checking done on the destination
  1081. X *    buffer, so it better be large enough to hold
  1082. X *    all expected strings.
  1083. X *
  1084. X */
  1085. X
  1086. X/*
  1087. X *  PSEUDO CODE
  1088. X *
  1089. X *    Begin decode
  1090. X *        Initialize the transfer pointer.
  1091. X *        While there is an input character left to process
  1092. X *        Switch on input character
  1093. X *        Case ESCAPE:
  1094. X *            Decode and xfer the escaped sequence.
  1095. X *            Break
  1096. X *        Case CONTROLIFY:
  1097. X *            Controlify and xfer the next character.
  1098. X *            Advance the buffer pointer.
  1099. X *            Break
  1100. X *        Default:
  1101. X *            Xfer a normal character.
  1102. X *        End switch
  1103. X *        End while
  1104. X *        Null terminate the output string.
  1105. X *        Remember where the output string starts.
  1106. X *        Update the output buffer pointer.
  1107. X *        Return pointer to the output string.
  1108. X *    End decode
  1109. X *
  1110. X */
  1111. X
  1112. Xstatic char *decode(bp,area)
  1113. Xchar *bp;
  1114. Xchar **area;
  1115. X{
  1116. X    char *cp, *bgn;
  1117. X    char *do_esc();
  1118. X
  1119. X    cp = *area;
  1120. X    while (*bp != NULL && *bp != ':') {
  1121. X    switch(*bp) {
  1122. X    case '\\':
  1123. X        bp = do_esc(cp++,++bp);
  1124. X        break;
  1125. X    case '^':
  1126. X        *cp++ = *++bp & 037;
  1127. X        bp++;
  1128. X        break;
  1129. X    default:
  1130. X        *cp++ = *bp++;
  1131. X        break;
  1132. X    }
  1133. X    }
  1134. X    *cp++ = (char) NULL;
  1135. X    bgn = *area;
  1136. X    *area = cp;
  1137. X    return(bgn);
  1138. X}
  1139. X
  1140. X/*
  1141. X *  INTERNAL FUNCTION
  1142. X *
  1143. X *    do_esc    process an escaped sequence
  1144. X *
  1145. X *  SYNOPSIS
  1146. X *
  1147. X *    char *do_esc(out,in);
  1148. X *    char *out;
  1149. X *    char *in;
  1150. X *
  1151. X *  DESCRIPTION
  1152. X *
  1153. X *    Processes an escape sequence pointed to by
  1154. X *    in, transfering it to location pointed to
  1155. X *    by out, and updating the pointer to in.
  1156. X *
  1157. X */
  1158. X
  1159. X/*
  1160. X *  PSEUDO CODE
  1161. X *
  1162. X *    Begin do_esc
  1163. X *        If the first character is not a NULL then
  1164. X *        If is a digit then
  1165. X *            Set value to zero.
  1166. X *            For up to 3 digits
  1167. X *                Accumulate the sum.
  1168. X *            End for
  1169. X *            Transfer the sum.
  1170. X *            Else if character is in remap list then
  1171. X *            Transfer the remapped character.
  1172. X *            Advance the input pointer once.
  1173. X *            Else
  1174. X *            Simply transfer the character.
  1175. X *            End if
  1176. X *        End if
  1177. X *        Return updated input pointer.
  1178. X *    End do_esc
  1179. X *
  1180. X */
  1181. X
  1182. Xstatic char *maplist = {
  1183. X    "E\033b\bf\fn\nr\rt\t"
  1184. X};
  1185. X
  1186. Xchar *do_esc(out,in)
  1187. Xchar *out;
  1188. Xchar *in;
  1189. X{
  1190. X    int count;
  1191. X    char ch;
  1192. X    char *cp;
  1193. X
  1194. X    if (*in != NULL) {
  1195. X    if (isdigit(*in)) {
  1196. X        ch = 0;
  1197. X        for (count = 0; count < 3 && isdigit(*in); in++) {
  1198. X         ch <<= 3;
  1199. X         ch |= (*in - '0');
  1200. X        }
  1201. X        *out++ = ch;
  1202. X    } else if ((cp = (char *)index(maplist,*in)) != NULL) {
  1203. X        *out++ = *++cp;
  1204. X        in++;
  1205. X    } else {
  1206. X        *out++ = *in++;
  1207. X    }
  1208. X    }
  1209. X    return(in);
  1210. X}
  1211. END_OF_FILE
  1212. if test 6347 -ne `wc -c <'tgetstr.c'`; then
  1213.     echo shar: \"'tgetstr.c'\" unpacked with wrong size!
  1214. fi
  1215. # end of 'tgetstr.c'
  1216. fi
  1217. echo shar: End of archive 6 \(of 11\).
  1218. cp /dev/null ark6isdone
  1219. MISSING=""
  1220. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  1221.     if test ! -f ark${I}isdone ; then
  1222.     MISSING="${MISSING} ${I}"
  1223.     fi
  1224. done
  1225. if test "${MISSING}" = "" ; then
  1226.     echo You have unpacked all 11 archives.
  1227.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1228. else
  1229.     echo You still need to unpack the following archives:
  1230.     echo "        " ${MISSING}
  1231. fi
  1232. ##  End of shell archive.
  1233. exit 0
  1234.